object SRepAutoLoadF: TSRepAutoLoadF
  Left = 427
  Top = 237
  BorderIcons = [biSystemMenu, biMinimize]
  BorderStyle = bsSingle
  Caption = #1047#1072#1075#1088#1091#1079#1082#1072' '#1089#1084#1077#1085#1085#1099#1093' '#1086#1090#1095#1077#1090#1086#1074
  ClientHeight = 336
  ClientWidth = 382
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'MS Sans Serif'
  Font.Style = []
  OldCreateOrder = False
  Position = poScreenCenter
  OnClose = FormClose
  OnShow = FormShow
  PixelsPerInch = 96
  TextHeight = 13
  object p1: TPanel
    Left = 0
    Top = 272
    Width = 382
    Height = 32
    Align = alBottom
    TabOrder = 1
    DesignSize = (
      382
      32)
    object sbAutoLoad: TSpeedButton
      Left = 102
      Top = 3
      Width = 25
      Height = 25
      Hint = #1042#1082#1083#1102#1095#1080#1090#1100' '#1072#1074#1090#1086#1079#1072#1075#1088#1091#1079#1082#1091
      AllowAllUp = True
      Anchors = [akTop, akRight]
      GroupIndex = 121
      Glyph.Data = {
        3E040000424D3E04000000000000760000002800000058000000160000000100
        040000000000C803000000000000000000001000000010000000000000000000
        80000080000000808000800000008000800080800000C0C0C000808080000000
        FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00777777777777
        7777777777777777777777777777777777777777777777777777777777777777
        777777777777777777770000007777777777777777FFFFFF7777777777777777
        0000007777777777777777000000777777777777770088888800777777777777
        FF888888FF777777777777008888880077777777777700888888007777777777
        70887707778807777777777F8877F77788F7777777777088FF0FFF8807777777
        777088FF0FFF8807777777770870777770778077777777887F77777F778F7777
        777708F0FFFFF0FF807777777708F0FFFFF0FF80777777708F87777777777807
        777778F7777777777778F77777708FFFFFFFFFFFF8077777708FFFFFFFFFFFF8
        077777708FF8777777770807777778F77777777777F8F77777708FFFFFFFFFFF
        08077777708FFFFFFFFFFF0807777708F0FF87777777778077778F7F77777777
        77778F777708F0FFFFFFFFFFFF80777708F0FFFFFFFFFFFF80777708FFFFF877
        7777778077778F777777887777778F777708FFFFFF99FFFFFF80777708FFFFFF
        88FFFFFF80777708FFFFF8877777708077778F7777788887777F8F777708FFFF
        F9999FFFF080777708FFFFF8888FFFF0807777080FFFF8877777778077778FF7
        7778878777778F7777080FFFF99C9FFFFF807777080FFFF8878FFFFF80777708
        FFFFFF877777778077778F777777877877778F777708FFFFFF9CC9FFFF807777
        08FFFFFF8778FFFF80777708FFFFFF877777078077778F777777877787F78F77
        7708FFFFFF9CCC9F0F80777708FFFFFF87778F0F8077777080FFFF8777777807
        777778FF777787777878F777777080FFFF9CCCC9F80777777080FFFF877778F8
        077777708FFFFF8777777807777778F7777787777778F77777708FFFFF9CCCCC
        F8077777708FFFFF877777F80777777708FF0F87770780777777778F77F78777
        F7FF7777777708FF0F9CCC0C807777777708FF0F87770780777777777088FFF0
        7788077777777778FF777F77FF87777777777088FFF0CC8807777777777088FF
        F07788077777777777008888880077777777777788FFFFFF8877777777777700
        8888880077777777777700888888007777777777777700000077777777777777
        7788888877777777777777770000007777777777777777000000777777777777
        77777708777777777777777777778F7777777777777777777708777777777777
        777777770877777777777777777770008777777777777777777888F777777777
        7777777770008777777777777777777000877777777777777777700087777777
        77777777777888F7777777777777777770008777777777777777777000877777
        7777}
      NumGlyphs = 4
      ParentShowHint = False
      ShowHint = True
      OnClick = sbAutoLoadClick
    end
    object sbLog: TSpeedButton
      Left = 38
      Top = 3
      Width = 25
      Height = 25
      Hint = #1054#1090#1082#1088#1099#1090#1100' '#1083#1086#1075
      Glyph.Data = {
        36040000424D3604000000000000360000002800000010000000100000000100
        2000000000000004000000000000000000000000000000000000FF00FF00FF00
        FF00000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000FF00FF00FF00FF00FF00FF00FF00FF007B7B
        7B00BDBDBD00BDBDBD00BDBDBD00BDBDBD00BDBDBD00BDBDBD00BDBDBD00BDBD
        BD00BDBDBD00BDBDBD00BDBDBD0000000000FF00FF00FF00FF00FF00FF007B7B
        7B00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
        FF00FF00FF00FF00FF00BDBDBD0000000000FF00FF00FF00FF00FF00FF007B7B
        7B00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
        FF00FF00FF00FF00FF00BDBDBD0000000000FF00FF00FF00FF00FF00FF007B7B
        7B00FF00FF00FF00FF0000000000000000000000000000000000000000000000
        0000FF00FF00FF00FF00BDBDBD0000000000FF00FF00FF00FF00FF00FF007B7B
        7B00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
        FF00FF00FF00FF00FF00BDBDBD0000000000FF00FF00FF00FF00FF00FF007B7B
        7B00FF00FF00FF00FF0000000000000000000000000000000000000000000000
        0000FF00FF00FF00FF00BDBDBD0000000000FF00FF00FF00FF00FF00FF007B7B
        7B00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
        FF00FF00FF00FF00FF00BDBDBD0000000000FF00FF00FF00FF00FF00FF007B7B
        7B00FF00FF00FF00FF0000000000000000000000000000000000000000000000
        0000FF00FF00FF00FF00BDBDBD0000000000FF00FF00FF00FF00FF00FF007B7B
        7B00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
        FF00FF00FF00FF00FF00BDBDBD0000000000FF00FF00FF00FF00FF00FF007B7B
        7B00FF00FF00FF00FF00000000000000000000000000FF00FF00000000000000
        0000FF00FF00FF00FF00BDBDBD0000000000FF00FF00FF00FF00FF00FF007B7B
        7B00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
        FF00FF00FF00FF00FF00BDBDBD0000000000FF00FF00FF00FF00FF00FF007B7B
        7B00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
        FF00FF00FF00FF00FF00BDBDBD0000000000FF00FF00FF00FF00FF00FF007B7B
        7B00FF00FF0000000000FF00FF0000000000FF00FF0000000000FF00FF000000
        0000FF00FF0000000000FF00FF0000000000FF00FF00FF00FF00FF00FF00FF00
        FF0000000000FF00FF007B7B7B00FF00FF007B7B7B00FF00FF007B7B7B00FF00
        FF007B7B7B00FF00FF0000000000FF00FF00FF00FF00FF00FF00FF00FF00FF00
        FF00FF00FF0000000000FF00FF0000000000FF00FF0000000000FF00FF000000
        0000FF00FF0000000000FF00FF00FF00FF00FF00FF00FF00FF00}
      ParentShowHint = False
      ShowHint = True
      OnClick = sbLogClick
    end
    object bHelp: TOilHelpButton
      Left = 6
      Top = 3
      Width = 25
      Height = 25
      Hint = #1055#1086#1084#1086#1097#1100
      AllowAllUp = True
      GroupIndex = 1001
      Glyph.Data = {
        36040000424D3604000000000000360000002800000010000000100000000100
        2000000000000004000000000000000000000000000000000000FFFFFF00FFFF
        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF007B7B7B000000FF007B7B7B00FFFF
        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
        FF00FFFFFF0000FFFF00FFFFFF0000FFFF000000FF000000FF000000FF0000FF
        FF00FFFFFF0000FFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
        FF0000FFFF00FFFFFF0000FFFF00FFFFFF007B7B7B000000FF007B7B7B00FFFF
        FF0000FFFF00FFFFFF0000FFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000FF
        FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF
        FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
        FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF000000FF0000FFFF00FFFF
        FF0000FFFF00FFFFFF0000FFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000FF
        FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF000000FF007B7B7B0000FF
        FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF00FFFFFF0000FFFF00FFFF
        FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF000000FF000000FF00FFFF
        FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF00FFFFFF0000FF
        FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF000000FF000000
        FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF00FFFFFF0000FFFF00FFFF
        FF0000FFFF00FFFFFF007B7B7B007B7B7B0000FFFF00FFFFFF007B7B7B000000
        FF000000FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF00FFFFFF0000FF
        FF00FFFFFF0000FFFF000000FF000000FF00FFFFFF0000FFFF007B7B7B000000
        FF000000FF0000FFFF00FFFFFF0000FFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
        FF0000FFFF00FFFFFF000000FF000000FF007B7B7B00FFFFFF007B7B7B000000
        FF000000FF00FFFFFF0000FFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000FF
        FF00FFFFFF0000FFFF00FFFFFF000000FF000000FF000000FF000000FF000000
        FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
        FF0000FFFF00FFFFFF0000FFFF00FFFFFF000000FF000000FF000000FF00FFFF
        FF0000FFFF00FFFFFF0000FFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
        FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF
        FF00FFFFFF0000FFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF
        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00}
      ParentShowHint = False
      ShowHint = True
      AnimateTime = 200
      Lines.Strings = (
        
          '{11}{RED}\B'#1044#1083#1103' '#1079#1072#1075#1088#1091#1079#1082#1080' '#1092#1072#1081#1083#1086#1074' '#1089' '#1087#1072#1087#1082#1080'\D{9} '#1085#1077#1086#1073#1093#1086#1076#1080#1084#1086' '#1074#1099#1073#1088#1072#1090#1100' '#1090 +
          #1080#1087' '#1079#1072#1075#1088#1091#1078#1072#1077#1084#1099#1093' '#1092#1072#1081#1083#1086#1074' ('#171#1047#1072#1075#1088#1091#1078#1072#1090#1100' '#1092#1072#1081#1083#1099' '#1089' '#1088#1072#1089#1096#1080#1088#1077#1085#1080#1077#1084' OIL '#1080' ZIP'#187 +
          ' '#1080#1083#1080' '#171#1047#1072#1075#1088#1091#1078#1072#1090#1100' '#1092#1072#1081#1083#1099' '#1089' '#1088#1072#1089#1096#1080#1088#1077#1085#1080#1077#1084' DBF'#187') '#1080' '#1091#1082#1072#1079#1072#1090#1100' '#1087#1072#1087#1082#1091'. '#1044#1072#1083#1077#1077 +
          ' '#1085#1091#1078#1085#1086' '#1085#1072#1078#1072#1090#1100' '#1085#1072' '#1082#1085#1086#1087#1082#1091' '#171#1057' '#1087#1072#1087#1082#1080#187'.'
        ''
        
          '{11}{RED}\B'#1044#1083#1103' '#1079#1072#1075#1088#1091#1079#1082#1080' '#1092#1072#1081#1083#1086#1074' '#1089' FTP\D{9} '#1085#1077#1086#1073#1093#1086#1076#1080#1084#1086' '#1074#1099#1073#1088#1072#1090#1100' '#1090#1080#1087 +
          ' '#1079#1072#1075#1088#1091#1078#1072#1077#1084#1099#1093' '#1092#1072#1081#1083#1086#1074' ('#171#1047#1072#1075#1088#1091#1078#1072#1090#1100' '#1092#1072#1081#1083#1099' '#1089' '#1088#1072#1089#1096#1080#1088#1077#1085#1080#1077#1084' OIL '#1080' ZIP'#187' '#1080 +
          #1083#1080' '#171#1047#1072#1075#1088#1091#1078#1072#1090#1100' '#1092#1072#1081#1083#1099' '#1089' '#1088#1072#1089#1096#1080#1088#1077#1085#1080#1077#1084' DBF'#187'), '#1079#1072#1087#1086#1083#1085#1080#1090#1100' '#1072#1076#1088#1077#1089' FTP, '#1074#1088 +
          #1077#1084#1103' '#1079#1072#1075#1088#1091#1079#1082#1080', '#1087#1077#1088#1080#1086#1076#1080#1095#1085#1086#1089#1090#1100' '#1079#1072#1075#1088#1091#1079#1082#1080' '#1074' '#1084#1080#1085#1091#1090#1072#1093' '#1080' '#1091#1082#1072#1079#1072#1090#1100' '#1087#1072#1087#1082#1091'. ' +
          #1044#1072#1083#1077#1077' '#1085#1091#1078#1085#1086' '#1085#1072#1078#1072#1090#1100' '#1085#1072' '#1082#1085#1086#1087#1082#1091' '#1089' '#1080#1079#1086#1073#1088#1072#1078#1077#1085#1080#1077#1084' '#1089#1077#1082#1091#1085#1076#1086#1084#1077#1088#1072' '#1080#1083#1080' '#1085#1072' '#1082 +
          #1085#1086#1087#1082#1091' '#171#1057' FTP'#187'.'
        ''
        
          #1055#1088#1080' '#1079#1072#1075#1088#1091#1079#1082#1080' '#1092#1072#1081#1083#1086#1074' '#1089' '#1088#1072#1089#1096#1080#1088#1077#1085#1080#1077#1084' OIL '#1080' ZIP '#1090#1072#1083#1086#1085#1099' '#1073#1091#1076#1091#1090' '#1075#1088#1091#1079#1080#1090#1100 +
          #1089#1103' '#1087#1086' '#1084#1077#1090#1086#1076#1091' FIFO '#1080' '#1089' '#1087#1088#1080#1079#1085#1072#1082#1086#1084' "'#1042' '#1087#1091#1090#1080'".'
        ''
        
          '{11}{RED}\B'#1044#1083#1103' '#1087#1088#1086#1074#1077#1088#1082#1080' '#1079#1072#1075#1088#1091#1079#1082#1080' '#1092#1072#1081#1083#1086#1074'\D{9} '#1085#1077#1086#1073#1093#1086#1076#1080#1084#1086' '#1086#1090#1082#1088#1099#1090#1100' ' +
          #1083#1086#1075', '#1085#1072#1078#1072#1074' '#1085#1072' '#1082#1085#1086#1087#1082#1091' '#1089' '#1080#1079#1086#1073#1088#1072#1078#1077#1085#1080#1077#1084' '#1073#1083#1086#1082#1085#1086#1090#1072', '#1080#1083#1080' '#1079#1072#1081#1090#1080' '#1074' '#1087#1072#1087#1082#1091' ' +
          #1089' '#1082#1086#1090#1086#1088#1086#1081' '#1076#1086#1083#1078#1085#1099' '#1075#1088#1091#1079#1080#1090#1089#1103' '#1092#1072#1081#1083#1099' '#1080' '#1086#1090#1082#1088#1099#1090#1100' '#1092#1072#1081#1083' SRepAutoLoad.log.' +
          ' '#1042#1089#1077' '#1079#1072#1075#1088#1091#1078#1077#1085#1085#1099#1077' '#1092#1072#1081#1083#1099' '#1073#1091#1076#1091#1090' '#1087#1086#1087#1072#1076#1072#1090#1100' '#1074' '#1087#1072#1087#1082#1091' LoadedPacketsAZS, ' +
          #1072' '#1074#1089#1077' '#1092#1072#1081#1083#1099', '#1079#1072#1075#1088#1091#1078#1077#1085#1085#1099#1077' '#1089' '#1086#1096#1080#1073#1082#1072#1084#1080', '#1073#1091#1076#1091#1090' '#1087#1077#1088#1077#1080#1084#1077#1085#1086#1074#1072#1085#1085#1099#1077', '#1076#1086#1073#1072 +
          #1074#1083#1077#1085#1080#1077#1084' '#1074' '#1085#1072#1095#1072#1083#1077' '#1092#1072#1081#1083#1072' '#1087#1088#1080#1089#1090#1072#1074#1082#1080' '#171'Error_'#187'. '#1042#1089#1077' '#1085#1077#1079#1072#1075#1088#1091#1078#1077#1085#1085#1099#1077' '#1092#1072#1081 +
          #1083#1099', '#1085#1077#1086#1073#1093#1086#1076#1080#1084#1086' '#1087#1077#1088#1077#1075#1088#1091#1079#1080#1090#1100' '#1074#1088#1091#1095#1085#1091#1102'.'
        ''
        
          '{11}{RED}\B'#1044#1083#1103' '#1089#1086#1093#1088#1072#1085#1077#1085#1080#1103' '#1085#1072#1089#1090#1088#1086#1077#1082'\D{9} '#1085#1077#1086#1073#1093#1086#1076#1080#1084#1086' '#1085#1072#1078#1072#1090#1100' '#1085#1072' '#1082#1085#1086 +
          #1087#1082#1091' '#1089' '#1080#1079#1086#1073#1088#1072#1078#1077#1085#1080#1077#1084' '#1080#1085#1089#1090#1088#1091#1084#1077#1085#1090#1086#1074'.')
      HeaderFont.Charset = DEFAULT_CHARSET
      HeaderFont.Color = clWindowText
      HeaderFont.Height = -11
      HeaderFont.Name = 'MS Sans Serif'
      HeaderFont.Style = []
      Animate = False
      UseCurrentDir = False
      FormOrientation = fBottomToTop
      ImageIndex = 0
    end
    object sbSaveSettings: TSpeedButton
      Left = 70
      Top = 3
      Width = 25
      Height = 25
      Hint = #1057#1086#1093#1088#1072#1085#1080#1090#1100' '#1085#1072#1089#1090#1088#1086#1081#1082#1080
      Enabled = False
      Glyph.Data = {
        36040000424D3604000000000000360000002800000010000000100000000100
        2000000000000004000000000000000000000000000000000000FF00FF00FF00
        FF00FF00FF00FF00FF00FF00FF0000000000FFFFFF00FFFFFF0000000000FF00
        FF00FF00FF000000FF0000007B000000FF00FF00FF0000000000FF00FF007B7B
        7B00000000000000000000000000FFFFFF00FFFFFF0000000000FF00FF00FF00
        FF00FF00FF000000FF0000007B000000FF0000000000007B7B007B7B7B000000
        0000FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FF00FF00FF00FF00FF00
        FF00FF00FF000000FF0000007B000000FF00007B7B00007B7B0000000000FFFF
        FF000000000000000000FFFFFF00FFFFFF0000000000FF00FF00FF00FF00FF00
        FF00FF00FF000000FF0000007B000000FF00007B7B00007B7B00000000000000
        0000FF00FF00FF00FF0000000000FFFFFF0000000000FF00FF00FF00FF00FF00
        FF00FF00FF000000FF0000007B000000FF00007B7B00FF00FF00000000007B7B
        7B00FF00FF00FF00FF0000000000FFFFFF0000000000FF00FF00FF00FF00FF00
        FF000000FF000000FF000000FF000000FF000000FF00FF00FF00FF00FF00FF00
        FF007B7B7B0000000000FFFFFF00000000007B7B7B00FF00FF00FF00FF000000
        000000007B0000007B0000007B0000007B0000007B00FF00FF00FF00FF00FF00
        FF000000000000000000000000007B7B7B00FF00FF00FF00FF0000000000007B
        7B00007B7B00007B7B0000000000FF00FF00FF00FF00FF00FF00FF00FF00FF00
        FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF0000000000007B7B00007B
        7B00007B7B00FF00FF0000000000FF00FF00FF00FF00FF00FF00FF00FF00FF00
        FF000000000000000000FF00FF00FF00FF0000000000007B7B00007B7B00007B
        7B00FF00FF00FF00FF0000000000FF00FF00FF00FF00FF00FF00FF00FF000000
        0000FF00FF0000000000FF00FF0000000000007B7B00007B7B00007B7B00FF00
        FF00FF00FF00FF00FF0000000000FF00FF00FF00FF00FF00FF0000000000FF00
        FF00000000000000000000000000007B7B00007B7B00007B7B00FF00FF00FF00
        FF00FF00FF00FF00FF0000000000FF00FF00FF00FF00FF00FF00000000000000
        000000000000000000000000000000000000007B7B00FF00FF00FF00FF00FF00
        FF00FF00FF007B7B7B00000000007B7B7B00FF00FF00FF00FF00FF00FF00FF00
        FF000000000000000000000000000000000000000000FF00FF00FF00FF00FF00
        FF00FF00FF007B7B7B00000000007B7B7B00FF00FF00FF00FF00FF00FF00FF00
        FF00007B7B00000000000000000000000000000000007B7B7B00FF00FF00FF00
        FF00FF00FF007B7B7B00000000007B7B7B00FF00FF00FF00FF00FF00FF00FF00
        FF00007B7B00007B7B00FF00FF00000000000000000000000000000000000000
        0000FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00}
      ParentShowHint = False
      ShowHint = True
      OnClick = sbSaveSettingsClick
    end
    object bbCancel: TBitBtn
      Left = 288
      Top = 3
      Width = 88
      Height = 25
      Hint = #1047#1072#1082#1088#1099#1090#1100' '#1092#1086#1088#1084#1091' '#1080' '#1086#1090#1084#1077#1085#1080#1090#1100' '#1072#1074#1090#1086#1079#1072#1075#1088#1091#1079#1082#1091
      Anchors = [akTop, akRight]
      Caption = '&'#1054#1090#1084#1077#1085#1080#1090#1100
      Default = True
      ModalResult = 2
      ParentShowHint = False
      ShowHint = True
      TabOrder = 0
      Glyph.Data = {
        DE010000424DDE01000000000000760000002800000024000000120000000100
        0400000000006801000000000000000000001000000010000000000000000000
        80000080000000808000800000008000800080800000C0C0C000808080000000
        FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333333333333
        333333333333333333333333000033338833333333333333333F333333333333
        0000333911833333983333333388F333333F3333000033391118333911833333
        38F38F333F88F33300003339111183911118333338F338F3F8338F3300003333
        911118111118333338F3338F833338F3000033333911111111833333338F3338
        3333F8330000333333911111183333333338F333333F83330000333333311111
        8333333333338F3333383333000033333339111183333333333338F333833333
        00003333339111118333333333333833338F3333000033333911181118333333
        33338333338F333300003333911183911183333333383338F338F33300003333
        9118333911183333338F33838F338F33000033333913333391113333338FF833
        38F338F300003333333333333919333333388333338FFF830000333333333333
        3333333333333333333888330000333333333333333333333333333333333333
        0000}
      NumGlyphs = 2
    end
    object bbLoadDir: TBitBtn
      Left = 134
      Top = 3
      Width = 70
      Height = 25
      Hint = #1047#1072#1075#1088#1091#1079#1080#1090#1100' '#1089' '#1087#1072#1087#1082#1080
      Anchors = [akLeft, akTop, akRight]
      Caption = #1057' '#1087#1072#1087#1082#1080
      ParentShowHint = False
      ShowHint = True
      TabOrder = 1
      OnClick = bbLoadDirClick
      Glyph.Data = {
        36030000424D3603000000000000360000002800000010000000100000000100
        1800000000000003000000000000000000000000000000000000008080008080
        0080800080800000000080800080800080800080800080800080800000000080
        8000808000808000808000808000808000808000808000000000808000808000
        8080008080008080008080000000008080008080008080008080008080008080
        0080800000000000FF0000000080800080800080800080800000000000FF0000
        000080800080800080800080800080800080800000000000FF00000000808000
        80800080800080800000000000FF000000008080008080008080008080008080
        0000000000FF0000FF0000FF0000000080800080800000000000FF0000FF0000
        FF0000000080800080800080800080800000000000FF0000FF0000FF00000000
        80800080800000000000FF0000FF0000FF000000008080008080008080000000
        0000FF0000FF0000FF0000FF0000FF0000000000000000FF0000FF0000FF0000
        FF0000FF0000000080800080800000000000FF0000FF0000FF0000FF0000FF00
        00000000000000FF0000FF0000FF0000FF0000FF0000000080800000000000FF
        0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000
        FF0000FF0000FF0000000000000000000000000000000000FF00000000000000
        00000000000000000000000000FF000000000000000000000000008080008080
        0080800000000000FF0000000080800080800080800080800000000000FF0000
        000080800080800080800080800080800080800000000000FF00000000808000
        80800080800080800000000000FF000000008080008080008080008080008080
        0080800000000000FF0000000080800080800080800080800000000000FF0000
        000080800080800080800080800080800080800000000000FF00000000808000
        80800080800080800000000000FF000000008080008080008080008080008080
        0080800000000000FF0000000080800080800080800080800000000000FF0000
        0000808000808000808000808000808000808000000000000000000000808000
        8080008080008080000000000000000000008080008080008080}
    end
    object bbLoadFTP: TBitBtn
      Left = 211
      Top = 3
      Width = 70
      Height = 25
      Hint = #1047#1072#1075#1088#1091#1079#1080#1090#1100' '#1089' FTP'
      Anchors = [akLeft, akTop, akRight]
      Caption = #1057' FTP'
      ParentShowHint = False
      ShowHint = True
      TabOrder = 2
      OnClick = bbLoadFTPClick
      Glyph.Data = {
        36030000424D3603000000000000360000002800000010000000100000000100
        1800000000000003000000000000000000000000000000000000008080008080
        0080800080800000000080800080800080800080800080800080800000000080
        8000808000808000808000808000808000808000808000000000808000808000
        8080008080008080008080000000008080008080008080008080008080008080
        0080800000000000FF0000000080800080800080800080800000000000FF0000
        000080800080800080800080800080800080800000000000FF00000000808000
        80800080800080800000000000FF000000008080008080008080008080008080
        0000000000FF0000FF0000FF0000000080800080800000000000FF0000FF0000
        FF0000000080800080800080800080800000000000FF0000FF0000FF00000000
        80800080800000000000FF0000FF0000FF000000008080008080008080000000
        0000FF0000FF0000FF0000FF0000FF0000000000000000FF0000FF0000FF0000
        FF0000FF0000000080800080800000000000FF0000FF0000FF0000FF0000FF00
        00000000000000FF0000FF0000FF0000FF0000FF0000000080800000000000FF
        0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000FF0000
        FF0000FF0000FF0000000000000000000000000000000000FF00000000000000
        00000000000000000000000000FF000000000000000000000000008080008080
        0080800000000000FF0000000080800080800080800080800000000000FF0000
        000080800080800080800080800080800080800000000000FF00000000808000
        80800080800080800000000000FF000000008080008080008080008080008080
        0080800000000000FF0000000080800080800080800080800000000000FF0000
        000080800080800080800080800080800080800000000000FF00000000808000
        80800080800080800000000000FF000000008080008080008080008080008080
        0080800000000000FF0000000080800080800080800080800000000000FF0000
        0000808000808000808000808000808000808000000000000000000000808000
        8080008080008080000000000000000000008080008080008080}
    end
  end
  object p2: TPanel
    Left = 0
    Top = 0
    Width = 382
    Height = 272
    Align = alClient
    TabOrder = 0
    DesignSize = (
      382
      272)
    object l1: TLabel
      Left = 6
      Top = 8
      Width = 32
      Height = 13
      Caption = #1055#1072#1087#1082#1072
    end
    object l5: TLabel
      Left = 6
      Top = 32
      Width = 54
      Height = 13
      Hint = 'login:pass@host'
      Caption = #1040#1076#1088#1077#1089' FTP'
      ParentShowHint = False
      ShowHint = True
    end
    object l3: TLabel
      Left = 6
      Top = 80
      Width = 91
      Height = 13
      Caption = #1042#1088#1077#1084#1103' '#1079#1072#1075#1088#1091#1079#1082#1080' '#1089
    end
    object l4: TLabel
      Left = 151
      Top = 80
      Width = 12
      Height = 13
      Caption = #1087#1086
    end
    object l6: TLabel
      Left = 6
      Top = 104
      Width = 159
      Height = 13
      Caption = #1055#1077#1088#1080#1086#1076#1080#1095#1085#1086#1089#1090#1100' '#1079#1072#1075#1088#1091#1079#1082#1080' ('#1084#1080#1085'.)'
    end
    object l7: TLabel
      Left = 6
      Top = 56
      Width = 51
      Height = 13
      Caption = 'Proxy Host'
    end
    object l8: TLabel
      Left = 174
      Top = 56
      Width = 48
      Height = 13
      Caption = 'Proxy Port'
    end
    object lClock: TLabel
      Left = 244
      Top = 80
      Width = 56
      Height = 13
      Alignment = taRightJustify
      Caption = #1047#1072#1075#1088#1091#1079#1082#1072' '#1074
      Visible = False
    end
    object l9: TLabel
      Left = 267
      Top = 104
      Width = 33
      Height = 13
      Alignment = taRightJustify
      Caption = #1042#1088#1077#1084#1103
    end
    object deLoadDir: TDirectoryEdit
      Left = 69
      Top = 4
      Width = 308
      Height = 21
      NumGlyphs = 1
      Anchors = [akLeft, akTop, akRight]
      TabOrder = 0
      OnChange = eFTPNameChange
      OnKeyPress = deLoadDirKeyPress
    end
    object eFTPName: TEdit
      Left = 69
      Top = 28
      Width = 308
      Height = 21
      Hint = 'login:pass@host'
      ParentShowHint = False
      ShowHint = True
      TabOrder = 1
      OnChange = eFTPNameChange
    end
    object metFrom: TMaskEdit
      Left = 104
      Top = 76
      Width = 35
      Height = 21
      EditMask = '!90:00;1;_'
      MaxLength = 5
      TabOrder = 4
      Text = '01:00'
      OnChange = eFTPNameChange
      OnExit = metFromExit
    end
    object metTo: TMaskEdit
      Left = 174
      Top = 76
      Width = 35
      Height = 21
      EditMask = '!90:00;1;_'
      MaxLength = 5
      TabOrder = 5
      Text = '06:00'
      OnChange = eFTPNameChange
      OnExit = metFromExit
    end
    object ePeriods: TEdit
      Left = 174
      Top = 100
      Width = 36
      Height = 21
      BiDiMode = bdLeftToRight
      MaxLength = 3
      ParentBiDiMode = False
      TabOrder = 6
      Text = '5'
      OnChange = eFTPNameChange
      OnKeyPress = ePeriodsKeyPress
    end
    object cbFileExpOil: TCheckBox
      Left = 6
      Top = 128
      Width = 240
      Height = 17
      Caption = #1047#1072#1075#1088#1091#1078#1072#1090#1100' '#1092#1072#1081#1083#1099' '#1089' '#1088#1072#1089#1096#1080#1088#1077#1085#1080#1077#1084' OIL '#1080' ZIP'
      Checked = True
      State = cbChecked
      TabOrder = 7
      OnClick = cbFileExpOilClick
    end
    object cbFileExpDBF: TCheckBox
      Left = 6
      Top = 152
      Width = 220
      Height = 17
      Caption = #1047#1072#1075#1088#1091#1078#1072#1090#1100' '#1092#1072#1081#1083#1099' '#1089' '#1088#1072#1089#1096#1080#1088#1077#1085#1080#1077#1084' DBF'
      TabOrder = 8
      OnClick = cbFileExpDBFClick
    end
    object cbFileErrorLoadOnFTP: TCheckBox
      Left = 6
      Top = 176
      Width = 310
      Height = 17
      Caption = #1060#1072#1081#1083#1099', '#1079#1072#1075#1088#1091#1078#1077#1085#1085#1099#1077' '#1089' '#1086#1096#1080#1073#1082#1072#1084#1080', '#1074#1099#1082#1083#1072#1076#1099#1074#1072#1090#1100' '#1085#1072' FTP'
      TabOrder = 9
      OnClick = eFTPNameChange
    end
    object eProxyHost: TEdit
      Left = 69
      Top = 52
      Width = 100
      Height = 21
      MaxLength = 14
      TabOrder = 2
      OnChange = eFTPNameChange
      OnKeyPress = eProxyHostKeyPress
    end
    object eProxyPort: TEdit
      Left = 228
      Top = 52
      Width = 35
      Height = 21
      MaxLength = 5
      TabOrder = 3
      OnChange = eFTPNameChange
      OnKeyPress = ePeriodsKeyPress
    end
    object rcLoad: TRxClock
      Left = 305
      Top = 100
      Width = 72
      Height = 21
      Ctl3D = True
      ParentCtl3D = False
    end
    object pClock: TPanel
      Left = 305
      Top = 76
      Width = 72
      Height = 21
      Hint = #1042#1088#1077#1084#1103' '#1089#1083#1077#1076#1091#1102#1097#1077#1081' '#1079#1072#1075#1088#1091#1079#1082#1080
      BevelInner = bvLowered
      Caption = 'pClock'
      Ctl3D = True
      ParentCtl3D = False
      ParentShowHint = False
      ShowHint = True
      TabOrder = 10
      Visible = False
    end
    object pnb: TPanel
      Left = 6
      Top = 195
      Width = 370
      Height = 73
      TabOrder = 11
      object nb: TNotebook
        Left = 1
        Top = 1
        Width = 368
        Height = 71
        Align = alClient
        TabOrder = 0
        object TPage
          Left = 0
          Top = 0
          Caption = 'OIL'
          object lSections: TLabel
            Left = 34
            Top = 28
            Width = 37
            Height = 13
            Caption = #1057#1077#1082#1094#1080#1103
          end
          object sbSections: TSpeedButton
            Left = 340
            Top = 23
            Width = 23
            Height = 22
            Enabled = False
            Flat = True
            Glyph.Data = {
              76010000424D7601000000000000760000002800000020000000100000000100
              0400000000000001000000000000000000001000000010000000000000000000
              80000080000000808000800000008000800080800000C0C0C000808080000000
              FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00DDDDDDDDDDDD
              DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD88DDDDDDDD
              88DDDDFFDDDDDDDDFFDDDD888DDDDDD888DDDDFFFDDDDDDFFFDDDDD888DDDD88
              8DDDDDDFFFDDDDFFFDDDDDDD888DD888DDDDDDDDFFFDDFFFDDDDDDDDD888888D
              DDDDDDDDDFFFFFFDDDDDDDDDDD8888DDDDDDDDDDDDFFFFDDDDDDDDDDDD8888DD
              DDDDDDDDDDFFFFDDDDDDDDDDD888888DDDDDDDDDDFFFFFFDDDDDDDDD888DD888
              DDDDDDDDFFFDDFFFDDDDDDD888DDDD888DDDDDDFFFDDDDFFFDDDDD888DDDDDD8
              88DDDDFFFDDDDDDFFFDDDD88DDDDDDDD88DDDDFFDDDDDDDDFFDDDDDDDDDDDDDD
              DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD}
            NumGlyphs = 2
          end
          object cbLoadAddSections: TCheckBox
            Left = 16
            Top = 4
            Width = 347
            Height = 17
            Hint = 
              #1058#1086#1083#1100#1082#1086', '#1077#1089#1083#1080' '#1087#1072#1082#1077#1090' '#1089' '#1076#1086#1087#1086#1083#1085#1080#1090#1077#1083#1100#1085#1099#1084#1080' '#1076#1072#1085#1085#1099#1084#1080','#13#10#1090#1086#1077#1089#1090#1100' '#1090#1072#1082#1086#1081', '#1082#1086#1090 +
              #1086#1088#1099#1081' '#1085#1077' '#1080#1084#1077#1077#1090' '#1089#1077#1082#1094#1080#1080' TOTAL.'
            Caption = #1044#1086#1075#1088#1091#1078#1072#1090#1100' '#1076#1086#1087#1086#1083#1085#1080#1090#1077#1083#1100#1085#1099#1077' '#1076#1072#1085#1085#1099#1077' '#1082' '#1089#1084#1077#1085#1085#1099#1084' '#1086#1090#1095#1077#1090#1072#1084
            TabOrder = 0
          end
          object dblcSections: TRxDBLookupCombo
            Left = 79
            Top = 24
            Width = 260
            Height = 21
            DropDownCount = 20
            Enabled = False
            LookupField = 'SECTION_NAME'
            LookupSource = dsSections
            TabOrder = 1
          end
          object cbLoadMyPack: TCheckBox
            Left = 16
            Top = 52
            Width = 310
            Height = 17
            Caption = #1047#1072#1075#1088#1091#1078#1072#1090#1100' '#1090#1086#1083#1100#1082#1086' '#1089#1074#1086#1080' '#1087#1072#1082#1077#1090#1099
            TabOrder = 2
          end
        end
        object TPage
          Left = 0
          Top = 0
          Caption = 'DBF'
          object cbLoadAddDBF: TCheckBox
            Left = 16
            Top = 28
            Width = 347
            Height = 17
            Caption = #1044#1086#1073#1072#1074#1080#1090#1100' '#1074#1089#1077' '#1076#1072#1085#1085#1099#1077
            TabOrder = 1
          end
          object cbLoadRestDBF: TCheckBox
            Left = 16
            Top = 4
            Width = 347
            Height = 17
            Caption = #1054#1090#1082#1086#1088#1088#1077#1082#1090#1080#1088#1086#1074#1072#1090#1100' '#1086#1089#1090#1072#1090#1082#1080' '#1085#1072' '#1085#1072#1095#1072#1083#1086' '#1087#1077#1088#1080#1086#1076#1072
            TabOrder = 0
          end
        end
      end
    end
  end
  object pbPerfect: TProgressBar
    Left = 0
    Top = 304
    Width = 382
    Height = 16
    Align = alBottom
    Step = 1
    TabOrder = 2
  end
  object pbDetailed: TProgressBar
    Left = 0
    Top = 320
    Width = 382
    Height = 16
    Align = alBottom
    Step = 1
    TabOrder = 3
  end
  object IdFTP: TIdFTP
    IPVersion = Id_IPv4
    AutoLogin = True
    Passive = True
    TransferType = ftBinary
    ProxySettings.ProxyType = fpcmNone
    ProxySettings.Port = 0
    Left = 248
    Top = 8
  end
  object tPeriod: TTimer
    Enabled = False
    Interval = 10000
    OnTimer = tPeriodTimer
    Left = 288
    Top = 8
  end
  object tWork: TTimer
    Enabled = False
    Interval = 300000
    OnTimer = tWorkTimer
    Left = 328
    Top = 8
  end
  object qDBF: TQuery
    Left = 288
    Top = 56
  end
  object qColumns: TQuery
    SQL.Strings = (
      'REP_DATE'
      'OBL_OKPO'
      'AZS_NAME'
      'SMENA_NUM'
      'NP_NAME'
      'OPER_TYPE'
      'OPER_ID'
      'KOMENT_OP'
      'P_PRICE'
      'LITR'
      'WEIGHT'
      'DENSITY'
      'SUMM'
      'NB')
    Left = 328
    Top = 56
  end
  object qWork: TOilQuery
    Session = frmStart.OraSession1
    RequestLive = False
    UpdateMode = upWhereAll
    Left = 247
    Top = 56
  end
  object qRestNP: TOilQuery
    SQL.Strings = (
      'select /*+ORDERED*/'
      ' c.ttn_id,'
      ' c.ttn_inst,'
      ' c.np_grp,'
      ' c.np_type_id,'
      ' c.s_price, -- '#1094#1110#1085#1072' '#1088#1077#1072#1083#1110#1079#1072#1094#1110#1111' '
      ' c_pr_ud_weig as ud_weig, -- '#1085#1086#1074#1072' '#1075#1091#1089#1090#1080#1085#1072' '#1076#1083#1103' '#1088#1077#1072#1083#1110#1079#1072#1094#1110#1111
      ' '
      ' c.RestOpenL, -- '#1082#1110#1083#1100#1082#1110#1089#1090#1100' '#1083#1110#1090#1088#1110#1074' '#1085#1072' '#1087#1086#1095#1072#1090#1086#1082
      ' c.RestOpenT -- '#1082#1110#1083#1100#1082#1110#1089#1090#1100' '#1090#1086#1085#1085' '#1085#1072' '#1087#1086#1095#1072#1090#1086#1082
      '  from (select np_grp,'
      '               np_type,'
      '               min(np_type_id) as np_type_id,'
      '               '
      
        '               min(decode(inst, ttn_inst, ttn_id, 1e20)) as ttn_' +
        'id,'
      
        '               max(decode(inst, ttn_inst, ttn_inst, null)) as tt' +
        'n_inst,'
      '               '
      
        '               to_number(substr(max(to_char(rep_date, '#39'YYYYMMDDH' +
        'H24MISS'#39') ||'
      '                                    s_price),'
      
        '                                15)) as s_price, -- '#1094#1110#1085#1072' '#1088#1077#1072#1083#1110#1079#1072 +
        #1094#1110#1111
      
        '               to_number(substr(max((1 - IsPrih) * (1 - IsRash) ' +
        '*'
      
        '                                    decode(pr_ud_weig, 0, 0, 1) ' +
        '*'
      
        '                                    to_char(rep_date, '#39'YYYYMMDDH' +
        'H24MISS'#39') ||'
      '                                    pr_ud_weig),'
      
        '                                15)) as c_pr_ud_weig, -- '#1075#1091#1089#1090#1080#1085#1072 +
        ' '#1091' '#1087#1086#1087#1077#1088#1077#1076#1085#1110#1081' '#1088#1077#1072#1083#1110#1079#1072#1094#1110#1111
      '               '
      '               sum((1 - IsPrih) * (1 - IsRash) *'
      
        '                   (pr_litr - out_nal_litr - out_ved_litr - out_' +
        'talon_litr -'
      
        '                   out_sn_litr - out_litr)) as RestOpenL, -- '#1082#1110#1083 +
        #1100#1082#1110#1089#1090#1100' '#1083#1110#1090#1088#1110#1074' '#1085#1072' '#1087#1086#1095#1072#1090#1086#1082
      '               sum((1 - IsPrih) * (1 - IsRash) *'
      '                   (pr_count - out_nal_count - out_ved_count -'
      
        '                   out_talon_count - out_sn_count - out_count)) ' +
        'as RestOpenT -- '#1082#1110#1083#1100#1082#1110#1089#1090#1100' '#1090#1086#1085#1085' '#1085#1072' '#1087#1086#1095#1072#1090#1086#1082
      
        '          from (select /*+ORDERED INDEX(drep IDX_OIL_DAYLY_REP_A' +
        'ZS) INDEX(dr I_DR_DATA) INDEX(p OIL_PART_IN1)*/'
      '                 drep.inst,'
      '                 drep.rep_date,'
      '                 dr.ttn_id,'
      '                 dr.ttn_inst,'
      '                 '
      
        '                 decode(npt.grp_id, 4, 48, npt.id) as np_type_id' +
        ','
      '                 decode(npt.us_subgroup_id,'
      '                        null,'
      '                        decode(npt.grp_id, 4, 5, npt.grp_id),'
      '                        npt.id) as np_type,'
      '                 decode(npt.us_subgroup_id,'
      '                        null,'
      '                        decode(npt.grp_id, 4, 5, npt.grp_id),'
      '                        null) as np_grp,'
      '                 '
      '                 decode(drep.rep_date, :p_rep_date, 1, 0) *'
      
        '                 decode(dr.oper_type, 0, 1, 0) as IsPrih, -- '#1087#1088#1080 +
        #1093#1086#1076#1080' '#1089#1100#1086#1075#1086#1076#1085#1110
      '                 '
      '                 decode(drep.rep_date, :p_rep_date, 1, 0) *'
      
        '                 decode(dr.oper_type, 1, 1, 2, 1, 0) as IsRash, ' +
        '-- '#1074#1110#1076#1087#1091#1089#1082#1080' '#1089#1100#1086#1075#1086#1076#1085#1110
      '                 '
      
        '                 decode(drep.rep_date, drep_prev.rep_date, 1, 0)' +
        ' *'
      
        '                 decode(dr.oper_type, 1, 1, 2, 1, 0) as IsRashPr' +
        'ev, -- '#1087#1086#1087#1077#1088#1077#1076#1085#1110' '#1074#1110#1076#1087#1091#1089#1082#1080
      '                 '
      
        '                 decode(to_date(ov.getval('#39'DR_AVERAGE_DATE'#39'), '#39'D' +
        'D.MM.YYYY'#39'),'
      '                        to_date(:p_rep_date, '#39'DD.MM.YYYY'#39'),'
      '                        1,'
      
        '                        0) as IsFirstDate, -- '#1094#1077' '#1087#1077#1088#1096#1072' '#1076#1072#1090#1072' '#1085#1086#1074#1086 +
        #1075#1086' '#1086#1073#1083#1110#1082#1091
      '                 '
      '                 sr.count_278, -- '#1094#1077' '#1082#1086#1088#1077#1075#1091#1074#1072#1085#1085#1103' '#1079#1072#1083#1080#1096#1082#1110#1074
      '                 '
      '                 nvl(dr.s_price, 0) as s_price,'
      '                 nvl(dr.pr_ud_weig, 0) as pr_ud_weig,'
      '                 nvl(dr.pr_litr, 0) as pr_litr,'
      '                 nvl(dr.pr_count, 0) as pr_count,'
      '                 '
      '                 nvl(dr.out_nal_litr, 0) as out_nal_litr,'
      '                 nvl(dr.out_ved_litr, 0) as out_ved_litr,'
      '                 nvl(dr.out_talon_litr, 0) as out_talon_litr,'
      '                 nvl(dr.out_sn_litr, 0) as out_sn_litr,'
      '                 nvl(dr.out_litr, 0) as out_litr,'
      '                 '
      '                 nvl(dr.out_nal_count, 0) as out_nal_count,'
      '                 nvl(dr.out_ved_count, 0) as out_ved_count,'
      '                 nvl(dr.out_talon_count, 0) as out_talon_count,'
      '                 nvl(dr.out_sn_count, 0) as out_sn_count,'
      '                 nvl(dr.out_count, 0) as out_count,'
      '                 '
      '                 nvl(dr.out_nal_money, 0) as out_nal_money,'
      '                 nvl(dr.out_ved_money, 0) as out_ved_money,'
      '                 nvl(dr.out_talon_money, 0) as out_talon_money,'
      '                 nvl(dr.out_sn_money, 0) as out_sn_money,'
      '                 nvl(dr.out_money, 0) as out_money'
      '                  from oil_daily_rep drep,'
      '                       oil_dr_data dr,'
      '                       oil_rashod r,'
      '                       oil_part p,'
      '                       oil_np_type npt,'
      '                       ( /*'#1094#1077' '#1076#1072#1090#1072' '#1087#1086#1087#1077#1088#1077#1076#1085#1100#1086#1075#1086' '#1079#1084#1110#1085#1085#1086#1075#1086' '#1079#1074#1110#1090#1091'*/'
      '                        select nvl(max(rep_date),'
      
        '                                    to_date('#39'01.01.2000'#39', '#39'DD.MM' +
        '.YYYY'#39')) as rep_date'
      '                          from oil_daily_rep'
      '                         where state = '#39'Y'#39
      '                           and rep_date < :p_rep_date'
      '                           and azs_id = :p_azs_id'
      '                           and azs_inst = :p_azs_id) drep_prev,'
      '                       ( /*'#1094#1077' '#1082#1086#1088#1077#1075#1091#1074#1072#1085#1085#1103' '#1079#1072#1083#1080#1096#1082#1110#1074'*/'
      
        '                        select srep_id, srep_inst, count(*) as c' +
        'ount_278'
      '                          from oil_srother'
      '                         where state = '#39'Y'#39
      '                           and oper_id = 278'
      '                         group by srep_id, srep_inst) sr,'
      '                       ( /*'#1094#1077' '#1076#1072#1090#1072' '#1085#1072' '#1087#1086#1095#1072#1090#1086#1082' '#1103#1082#1086#1111' '#1108' '#1079#1072#1083#1080#1096#1082#1080'*/'
      '                        select max(date_) as date_'
      '                          from (select date_'
      '                                   from oil_np_rest'
      '                                  where state = '#39'Y'#39
      '                                    and price is not null'
      
        '                                    and date_ < trunc(:p_rep_dat' +
        'e)'
      '                                    and azs_id = :p_azs_id'
      '                                 union all'
      
        '                                 select to_date('#39'01.01.1900'#39', '#39'D' +
        'D.MM.YYYY'#39')'
      '                                   from dual)) npr'
      '                 where drep.state = '#39'Y'#39
      '                   and dr.state = '#39'Y'#39
      '                   and r.state = '#39'Y'#39
      '                   and p.state = '#39'Y'#39
      '                      '
      '                   and drep.id = dr.rep_id'
      '                   and drep.inst = dr.rep_inst'
      '                      '
      '                   and dr.ttn_id = r.id'
      '                   and dr.ttn_inst = r.inst'
      '                      '
      '                   and r.part_id = p.id'
      '                   and r.part_inst = p.inst'
      '                      '
      '                   and p.np_type = npt.id'
      '                      '
      '                   and dr.id = sr.srep_id(+)'
      '                   and dr.inst = sr.srep_inst(+)'
      '                      '
      '                   and trunc(drep.rep_date) >= npr.date_'
      '                      '
      '                   and drep.azs_id = :p_azs_id'
      '                   and drep.azs_inst = :p_azs_id'
      '                      '
      '                   and ((dr.oper_type in (0, 1) and'
      '                       drep.rep_date <= :p_rep_date) or'
      '                       (dr.oper_type = 2 and'
      
        '                       drep.rep_date in (drep_prev.rep_date, :p_' +
        'rep_date)))'
      '                union all'
      '                /*'#1094#1077' '#1079#1072#1083#1080#1096#1082#1080'*/'
      '                select npr.inst,'
      '                       npr.rep_date,'
      '                       npr.ttn_id,'
      '                       npr.ttn_inst,'
      '                       '
      '                       npr.np_type_id,'
      '                       npr.np_type,'
      '                       npr.np_grp,'
      '                       '
      '                       1 as IsPrih, -- '#1087#1088#1080#1093#1086#1076#1080' '#1089#1100#1086#1075#1086#1076#1085#1110'       '
      '                       0 as IsRash, -- '#1074#1110#1076#1087#1091#1089#1082#1080' '#1089#1100#1086#1075#1086#1076#1085#1110'       '
      
        '                       0 as IsRashPrev, -- '#1087#1086#1087#1077#1088#1077#1076#1085#1110' '#1074#1110#1076#1087#1091#1089#1082#1080'   ' +
        '    '
      
        '                       decode(to_date(ov.getval('#39'DR_AVERAGE_DATE' +
        #39'),'
      '                                      '#39'DD.MM.YYYY'#39'),'
      
        '                              to_date(:p_rep_date, '#39'DD.MM.YYYY'#39')' +
        ','
      '                              1,'
      
        '                              0) as IsFirstDate, -- '#1094#1077' '#1087#1077#1088#1096#1072' '#1076#1072#1090 +
        #1072' '#1085#1086#1074#1086#1075#1086' '#1086#1073#1083#1110#1082#1091'    '
      
        '                       to_number(null) as count_278, -- '#1094#1077' '#1082#1086#1088#1077#1075 +
        #1091#1074#1072#1085#1085#1103' '#1079#1072#1083#1080#1096#1082#1110#1074
      '                       '
      '                       npr.s_price,'
      '                       npr.pr_ud_weig,'
      '                       npr.pr_litr,'
      '                       npr.pr_count,'
      '                       '
      '                       0 as out_nal_litr,'
      '                       0 as out_ved_litr,'
      '                       0 as out_talon_litr,'
      '                       0 as out_sn_litr,'
      '                       0 as out_litr,'
      '                       '
      '                       0 as out_nal_count,'
      '                       0 as out_ved_count,'
      '                       0 as out_talon_count,'
      '                       0 as out_sn_count,'
      '                       0 as out_count,'
      '                       '
      '                       0 as out_nal_money,'
      '                       0 as out_ved_money,'
      '                       0 as out_talon_money,'
      '                       0 as out_sn_money,'
      '                       0 as out_money'
      '                  from (select npr.*,'
      
        '                               row_number() over(partition by az' +
        's_id, np_grp, np_type order by rep_date desc, manual desc, id de' +
        'sc) as rnum'
      '                          from (select npr.id,'
      '                                       npr.inst,'
      '                                       npr.manual,'
      '                                       npr.date_ as rep_date,'
      '                                       npr.azs_id,'
      '                                       '
      
        '                                       decode(npt.grp_id, 4, 48,' +
        ' npt.id) as np_type_id,'
      
        '                                       decode(npt.us_subgroup_id' +
        ','
      '                                              null,'
      '                                              decode(npt.grp_id,'
      '                                                     4,'
      '                                                     5,'
      
        '                                                     npt.grp_id)' +
        ','
      
        '                                              npt.id) as np_type' +
        ','
      
        '                                       decode(npt.us_subgroup_id' +
        ','
      '                                              null,'
      '                                              decode(npt.grp_id,'
      '                                                     4,'
      '                                                     5,'
      
        '                                                     npt.grp_id)' +
        ','
      '                                              null) as np_grp,'
      '                                       '
      '                                       npr.ttn_id,'
      '                                       npr.ttn_inst,'
      '                                       npr.price     as s_price,'
      
        '                                       npr.ud_weight as pr_ud_we' +
        'ig,'
      '                                       npr.rest_litr as pr_litr,'
      '                                       npr.rest_kg   as pr_count'
      
        '                                  from oil_np_rest npr, oil_np_t' +
        'ype npt'
      '                                 where npr.state = '#39'Y'#39
      '                                   and price is not null'
      '                                   and np_type_id = npt.id'
      
        '                                   and date_ < trunc(:p_rep_date' +
        ')'
      
        '                                   and azs_id = :p_azs_id) npr) ' +
        'npr'
      '                 where rnum = 1)'
      '         group by np_grp, np_type) c'
      ' where 1 = 1')
    RequestLive = False
    UpdateMode = upWhereAll
    Left = 200
    Top = 192
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'p_rep_date'
      end
      item
        DataType = ftUnknown
        Name = 'p_azs_id'
      end>
  end
  object dsSections: TOraDataSource
    DataSet = qSections
    Left = 216
    Top = 237
  end
  object qSections: TOilQuery
    SQL.Strings = (
      'select *'
      '  from oil_azs_sections'
      ' where state = '#39'Y'#39
      '   and table_name is not null'
      '   and table_fields is not null'
      '   and section_name is not null'
      '   and section_fields is not null'
      ' order by section_name')
    RequestLive = False
    UpdateMode = upWhereAll
    Left = 198
    Top = 247
  end
end
